#ifndef _IPCS_H_
#define _IPCS_H_

#include "main.h"
#include "ICommandAnalysis.h"

namespace IPCS
{
	typedef struct
	{
		UINT ID;
		TCHAR msg[32];
	}st_MSG;

	class CIpcs
	{
	public:
		CIpcs(const TCHAR *strPipeName = TEXT("\\\\.\\pipe\\IPCS"));

		int StartIpcs();

		int StopIpcs();

		int SendIpc(HANDLE hIpc, const char* msg, DWORD msgSize);

		int RecvIpc(HANDLE hIpc, char* msg, DWORD msgSize);

		virtual ~CIpcs(){}
	private:
		static BOOL m_RunThread;
		static TCHAR m_strPipeName[STRMAX];
		static void threadIpc(void *p);
	};
}
#endif

